#pragma once


namespace wjb
{
	template<size_t N>
	class BitSet
	{
	public:
		BitSet()
		{
			_a.resize(N / 32 + 1);
		}

		void set(size_t x)
		{
			int i = x / 32;
			int j = x % 32;

			_a[i] |= (1 << j);
		}

		void reset(size_t x)
		{
			int i = x / 32;
			int j = x % 32;

			_a[i] &= ~(1 << j);
		}

		bool test(size_t x)
		{
			int i = x / 32;
			int j = x % 32;

			return _a[i] & (1 << j);
		}



	private:
		vector<int> _a;
	
	};


}